翻訳と辞書
Words near each other
・ Synaspismos
・ Synaspismos Youth
・ Synauchenia
・ Synaulia
・ Synaus (titular see)
・ Synaxaire Arabe-Jacobite
・ Synaxarium
・ Synaxis
・ Synaxis (moth)
・ SynBio
・ Synbio
・ Synbiotics
・ Synbranchiformes
・ Synbranchus
・ Sync
Sync (Unix)
・ Sync box
・ Sync OnSet
・ Sync sound
・ Sync.in
・ Syncada
・ Syncalama
・ Syncalathium
・ Syncallia
・ Syncamaris argophthalma
・ SynCardia Systems
・ Syncarida
・ Syncaris
・ Syncaris pacifica
・ Syncaris pasadenae


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Sync (Unix) : ウィキペディア英語版
Sync (Unix)

sync is a standard system call in the Unix operating system, which commits to disk all data in the kernel filesystem buffers, i.e., data which has been scheduled for writing via low-level I/O system calls. Note that higher-level I/O layers such as stdio may maintain separate buffers of their own.
As a function in C, the sync() call is typically declared as void sync(void) in . The system call is also available via a command line utility also called ''sync'', and similarly named functions in other languages such as Perl and NodeJS (in the fs module).
The related system call fsync() commits just the buffered data relating to a specified file descriptor.〔(fsync specification )〕 fdatasync() is also available to write out just the changes made to the data in the file, and not necessarily the file's related metadata.〔(fdatasync specification )〕
Unix systems typically run some kind of ''flush'' or ''update'' daemon, which calls the ''sync'' function on a regular basis. On some systems, the cron daemon does this, and on Linux it's handled by the pdflush daemon.〔(The Linux Page Cache and pdflush )〕 Buffers are also flushed when filesystems are unmounted or remounted read-only, for example prior to system shutdown.
==Database use==
In order to provide proper durability, databases need to use some form of sync in order to make sure the information written has made it to non-volatile storage rather than just being stored in a memory-based write cache that would be lost if power failed. PostgreSQL for example may use a variety of different sync calls, including fsync() and fdatasync(), in order for commits to be durable.〔(PostgreSQL Reliability and the Write-Ahead Log )〕 Unfortunately, for any single client writing a series of records, a rotating hard drive can only commit once per rotation, which makes for at best a few hundred such commits per second.〔(Tuning PostgreSQL WAL Synchronization )〕 Turning off the fsync requirement can therefore greatly improve commit performance, but at the expense of potentially introducing database corruption after a crash.
Databases also employ log files (typically much smaller than the main data files) that have information about recent changes, such that changes can be reliably redone in case of crash; then the main data files can be synced less often.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Sync (Unix)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.